package com.bprogram.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bprogram.dto.Mail;
import com.bprogram.dto.MailBox;
import com.bprogram.pojo.User;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author cai
 * @since 2023-11-20
 */
public interface UserService extends IService<User> {
    //注册用户
    boolean register(User user);

    //根据email查询该用户是否注册
    int getCodeNum(String userEmail);
    //发送邮件
    void  sendEmail(MailBox mailBox, Mail mail, String to);
    //分页查询
    public IPage<User> pageList(String currentPage, String pageSize, String userCode);

//删除user根据id
    public boolean userDelete(long id);

    public boolean updateUser(User user) ;
}
